package org.example.exampreparationtreasure.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Map;

@Data
@TableName(value = "questions", autoResultMap = true)
public class Question implements Serializable {
    @TableId(value = "question_id", type = IdType.AUTO)
    private Long questionId;

    @TableField(value = "question_type")
    private String questionType;

    @TableField(value = "question_content", typeHandler = JacksonTypeHandler.class)
    private Map<String, Object> questionContent;

    @TableField(value = "difficulty")
    private String difficulty;

    @TableField(value = "creator_id")
    private Long creatorId;

    @TableField(value = "category_id")
    private Long categoryId;

    @TableField(value = "create_time")
    private LocalDateTime createTime;

    @TableField(value = "update_time")
    private LocalDateTime updateTime;

    @TableField(value = "question_answer")
    private String questionAnswer;

    @TableField(value = "question_analysis")
    private String questionAnalysis;

    @TableField(value = "deleted_state")
    private Byte deletedState;
}


